package com.wytest.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wytest.dao.WorkMapper;
import com.wytest.entity.Work;
import com.wytest.service.WorkService;

@Service
public class WorkServiceImpl implements WorkService{

	@Resource
	private WorkMapper workMapper;
	public List<Map<String, Object>> getallwork() {
		return workMapper.getallwork();
	}
	public Map<String, Object> getbyid(int wid) {
		return workMapper.getbyid(wid);
	}
	public int addwork(Work work) {
		return workMapper.insertSelective(work);
	}
	public int updatework(Work work) {
		return workMapper.updateByPrimaryKeySelective(work);
	}
	public int delwork(int wid) {
		return workMapper.deleteByPrimaryKey(wid);
	}
	

}
